home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekikoh Dennoh Club 5
/
Gekikoh Dennoh Club Vol. 5 (Japan).7z
/
Gekikoh Dennoh Club Vol. 5 (Japan) (Track 01).bin
/
tools
/
condrv
/
cond_e12.lzh
/
src
/
include
/
macro.mac
< prev
Wrap
Text File
|
1998-07-10
|
1KB
|
84 lines
.nlist
* macro.mac
* RUKA assembler macro for X680x0/Human68k(v3)
* version 1.10 1998/07/11 Tachibana Eririn.
.ifndef __macro_mac__
__macro_mac__:=1
* Constant ------------------------------------ *
SR_T: .equ 15
SR_T1: .equ 15
SR_T0: .equ 14
SR_S: .equ 13
SR_M: .equ 12
SR_I2: .equ 10
SR_I1: .equ 9
SR_I0: .equ 8
CCR_X: .equ 4
CCR_N: .equ 3
CCR_Z: .equ 2
CCR_V: .equ 1
CCR_C: .equ 0
* User Macro ---------------------------------- *
PUSH: .macro regs
movem.l regs,-(sp)
.endm
POP: .macro regs
movem.l (sp)+,regs
.endm
EI: .macro
andi #.not.(1<<SR_I2+1<<SR_I1+1<<SR_I0),sr
.endm
DI: .macro
ori #(1<<SR_I2+1<<SR_I1+1<<SR_I0),sr
.endm
STRCPY: .macro src,dst
.local loop
loop: move.b (src)+,(dst)+
bne loop
.endm
STREND: .macro areg
.local loop
loop: tst.b (areg)+
bne loop
subq.l #1,areg
.endm
STRCAT: .macro src,dst
.local loop1,loop2
loop1: tst.b (dst)+
bne loop1
subq.l #1,dst
loop2: move.b (src)+,(dst)+
bne loop2
.endm
STRLEN: .macro areg,dreg
.local loop
move.l areg,dreg
loop: tst.b (areg)+
bne loop
subq.l #1,areg
exg dreg,areg
sub.l areg,dreg
.endm
* End of File --------------------------------- *
.endif
.list